package martin.tpfinal.reconocer.procesar.separateCoef;

import java.io.IOException;
import java.util.Properties;


public class CoefMaxMinProperties {
	
	
	private static Properties properties;
	
	private static final String PROPERTY_FILE = "CoefMaxMin.properties";
	
	private CoefMaxMinProperties(){}
	
	private static Properties getProperties(){
		if(properties==null){
			properties = new Properties();
            try {
				properties.load(CoefMaxMinProperties.class.getResourceAsStream(PROPERTY_FILE));
			} catch (IOException e) {
				
			}
		}
		return properties;
	}

	
	
	public static Double getMaxByCoef(int coef){
		
		String propertie = "COEF"+coef+"MAX";
		
		String valor = CoefMaxMinProperties.getProperties().getProperty(propertie);

		return Double.valueOf(valor);
		
	}

	public static Double getMinByCoef(int coef){
		
		String propertie = "COEF"+coef+"MIN";
		
		String valor = CoefMaxMinProperties.getProperties().getProperty(propertie);

		return Double.valueOf(valor);

		
	}

	
	
	
	
}
